package com.luych.toolbox.docker.service.sdk.network.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
import java.util.Map;

public class DockerNetworksCreateParam {

    @JsonProperty("Name")
    private String name;

    @JsonProperty("CheckDuplicate")
    private Boolean checkDuplicate;

    @JsonProperty("Driver")
    private String driver;

    @JsonProperty("EnableIPv6")
    private Boolean enableIPv6;

    @JsonProperty("IPAM")
    private IPAM ipam;

    @JsonProperty("Internal")
    private Boolean internal;

    @JsonProperty("Attachable")
    private Boolean attachable;

    @JsonProperty("Ingress")
    private Boolean ingress;

    @JsonProperty("Options")
    private Map<String, String> options;

    @JsonProperty("Labels")
    private Map<String, String> labels;

    public Map<String, String> getOptions() {
        return options;
    }

    public void setOptions(Map<String, String> options) {
        this.options = options;
    }

    public Boolean getInternal() {
        return internal;
    }

    public void setInternal(Boolean internal) {
        this.internal = internal;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public Boolean getIngress() {
        return ingress;
    }

    public void setIngress(Boolean ingress) {
        this.ingress = ingress;
    }

    public Map<String, String> getLabels() {
        return labels;
    }

    public void setLabels(Map<String, String> labels) {
        this.labels = labels;
    }

    public Boolean getEnableIPv6() {
        return enableIPv6;
    }

    public void setEnableIPv6(Boolean enableIPv6) {
        this.enableIPv6 = enableIPv6;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public IPAM getIpam() {
        return ipam;
    }

    public void setIpam(IPAM ipam) {
        this.ipam = ipam;
    }

    public Boolean getAttachable() {
        return attachable;
    }

    public void setAttachable(Boolean attachable) {
        this.attachable = attachable;
    }

    public Boolean getCheckDuplicate() {
        return checkDuplicate;
    }

    public void setCheckDuplicate(Boolean checkDuplicate) {
        this.checkDuplicate = checkDuplicate;
    }

    public static class IPAM {

        @JsonProperty("Options")
        private Map<String, String> options;

        @JsonProperty("Config")
        private List<Config> config;

        @JsonProperty("Driver")
        private String driver;

        public Map<String, String> getOptions() {
            return options;
        }

        public void setOptions(Map<String, String> options) {
            this.options = options;
        }

        public List<Config> getConfig() {
            return config;
        }

        public void setConfig(List<Config> config) {
            this.config = config;
        }

        public String getDriver() {
            return driver;
        }

        public void setDriver(String driver) {
            this.driver = driver;
        }

        public static class Config {

            @JsonProperty("Subnet")
            private String subnet;

            @JsonProperty("IPRange")
            private String ipRange;

            @JsonProperty("Gateway")
            private String gateway;

            @JsonProperty("AuxAddress")
            private String auxAddress;

            public String getSubnet() {
                return subnet;
            }

            public void setSubnet(String subnet) {
                this.subnet = subnet;
            }

            public String getIpRange() {
                return ipRange;
            }

            public void setIpRange(String ipRange) {
                this.ipRange = ipRange;
            }

            public String getGateway() {
                return gateway;
            }

            public void setGateway(String gateway) {
                this.gateway = gateway;
            }

            public String getAuxAddress() {
                return auxAddress;
            }

            public void setAuxAddress(String auxAddress) {
                this.auxAddress = auxAddress;
            }
        }
    }
}